
#pragma once

#include <bits/types/FILE.h>
#include <string>
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <unistd.h>

extern "C" {

    #include <libavformat/avformat.h>
    #include <libavutil/frame.h>
}

int WriteAudioData(AVFrame * frame, FILE * file_handle);
int WriteVideoData(AVFrame * frame, FILE * file_handle);


namespace hnhj {

int ProcessYUV420(AVFrame * frame, FILE * file_handle);
int ProcessYUV422(AVFrame * frame, FILE * file_handle);
int ProcessYUY444(AVFrame * frame, FILE * file_handle);

int ProcessPCMData(AVFrame * frame);

int ReadYUV420F(AVFrame * frame);

}

